package com.netease.dylan;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyInterceptor implements MethodInterceptor {

	
	@Override
	public Object invoke(MethodInvocation methodInvocation) throws Throwable {
		String info = methodInvocation.getMethod().getDeclaringClass() + "." + methodInvocation.getMethod().getName() + "()";
		System.out.println(info);
		try {
			Object result = methodInvocation.proceed();
			System.out.println("result: " + result);
			return result;
		} finally {
			System.out.println("finally info: " + info);
		}
	}

}
